#include "stdafx.h"
#include "TcpManager.h"

using namespace System;


int main(array<System::String ^> ^args)
{
	try
	{

		TcpManager^ tcp = gcnew TcpManager();

		tcp->Connect("127.0.0.1", 13000);

		while (true)
		{
			tcp->SendFrame();
			Thread::Sleep(125);
		}

		tcp->Disconnect();

	}
	catch ( ArgumentNullException^ e ) 
	{
		Console::WriteLine( "ArgumentNullException: {0}", e );
	}
	catch ( SocketException^ e ) 
	{
		Console::WriteLine( "SocketException: {0}", e );
	}

	Console::WriteLine( "\n Press Enter to continue..." );
	Console::Read();

	return 0;
}

